package com.kalman.common.io;

import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;

/**
 * @author kalman03
 */
public class JFileReader {

	public static void main(String[] args) {
		readFile("E:/test.csv");
	}

	public static void readFile(String fileName) {
		InputStream in = null;
		try {
			in = new FileInputStream(fileName);
			InputStreamReader isr = new InputStreamReader(in, "GB2312");
			BufferedReader br = new BufferedReader(isr);
			String line = null;
			while ((line = br.readLine()) != null) {
				Thread.sleep(1000);
				System.out.println(line);
			}
		} catch (Exception e1) {
			e1.printStackTrace();
		} finally {
			if (in != null) {
				try {
					in.close();
				} catch (IOException e1) {
				}
			}
		}
	}

}
